package com.techstar.ats.type;

import java.util.Set;

import com.techstar.ats.status.StatusEnumerated;

public enum TrainMode implements StatusEnumerated {
	SCHD_EARLY(0x00000008, "早点计划车"),
	SCHD_LATE(0x00000010, "晚点计划车"),
	SKIPSTOP(0x00000100, "设置跳停"),
	CBTC_MODE(0x00000200, "CBTC跟踪模式"),
	ATP_CUT(0x00000400, "列车ATP切除"),
	BERTHED(0x00000800, "在站台或存车线停站"),
	STOPED(0x00001000, "列车停止运动"),
	HOLDED(0x00002000, "被扣车"),
	ITAMA(0x00004000, "ITAMA允许"),
	DIR_UP(0x00008000, "跟踪的列车运动方向为上行"),
	DIR_DOWN(0x00010000, "跟踪的列车运动方向为下行"),
	DIR_HEAD_UP(0x00020000, "根据ATC报告列车上行头牵引"),
	DIR_HEAD_DOWN(0x00040000, "根据ATC报告列车下行头牵引"),
	DOOR_OPEN(0x00080000, "列车车门状态（关闭、开启）"),
	RS_ALARM(0x00100000, "列车车辆接口告警状态"),
	DOOR_ALARM(0x00200000, "列车车门告警状态"),
	EB_ALARM(0x00400000, "列车紧急制动告警"),
	INTEGRITY_ALARM(0x00800000, "列车完整性告警"),
	MODE_AM(0x10000000, "CBTC模式下有人自动驾驶模式"),
	MODE_CM(0x20000000, "CBTC模式下人工驾驶模式"),
	MODE_RMF(0x30000000, "RM模式前进"),
	MODE_DTO(0x40000000, "DTO无人驾驶模式"),
	MODE_ATB(0x50000000, "ATB自动折返模式"),
	BLOCK_AM(0x60000000, "点式有人自动驾驶模式"),
	BLOCK_CM(0x70000000, "点式人工驾驶模式"),
	MODE_RMR(0x80000000, "RM模式后退"),
	MODE_WASH(0x90000000, "洗车模式");

	private final int value;
	private final String literal;

	TrainMode(int value, String literal) {
		this.value = value;
		this.literal = literal;
	}

	public int value() {
		return this.value;
	}

	public String literal() {
		return this.literal;
	}

	public static Set<TrainMode> valueOf(int mask) {
		return StatusEnumerated.valueOf(TrainMode.class, mask);
	}
}
